package com.csun.cmny.provider.model.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Data
@Table(name = "cn_dmc_sleep_care_data")
public class DmcSleepCareData implements Serializable {

    private static final long serialVersionUID = 1123169568626085159L;

    /**
     * 设备Id
     */
    @Id
    @Column(name = "device_id")
    private Long deviceId;

    /**
     * 是否在床 0-不在床 1-在床
     */
    @Column(name = "in_bed")
    private Boolean inBed;

    /**
     * 心跳
     */
    private String heartbeat;

    /**
     * 呼吸
     */
    private String breath;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

}